package com.df.excel_export.common;

public class R {
    public int code;
    public String msg;
    public Object data;

    public static R ok(){
        R r = new R();
        r.code = 200;
        r.msg = "ok";
        return r;
    }

    public static R error(){
        R r = new R();
        r.code = -1;
        r.msg = "error";
        return r;
    }

    public R setCode(int code){
        this.code = code;
        return this;
    }

    public R setMsg(String msg){
        this.msg = msg;
        return this;
    }

    public R setData(Object data){
        this.data = data;
        return this;
    }
}
